import type { pageParams, pageResult } from '@/types/global'
import type { GuessLikeItem, bannerItem } from '@/types/home'

export const getBanner = (data: { distributionSite: number }) => {
  return uni.http<bannerItem[]>({
    url: '/home/banner',
    data,
  })
}

export const getCategory = <T>() => {
  return uni.http<T>({
    url: '/home/category/mutli',
  })
}

// 获取首页推荐
export const getHotPanel = <T>() => {
  return uni.http<T>({
    url: '/home/hot/mutli',
  })
}

// 获取猜你喜欢列表
export const getGuessList = (data: pageParams) => {
  return uni.http<pageResult<GuessLikeItem>>({
    url: '/home/goods/guessLike',
    data,
  })
}
